3.3.49 \(\int (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \sec ^7(c+d x) \, dx\) [249]

Optimal. Leaf size=324 \[ \frac {\left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (32 a^3 A b+40 a A b^3+8 a^4 B+60 a^2 b^2 B+15 b^4 B\right ) \tan (c+d x)}{15 d}+\frac {\left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{15 d}+\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d} \]

[Out]

1/16*(5*A*a^4+36*A*a^2*b^2+8*A*b^4+24*B*a^3*b+32*B*a*b^3)*arctanh(sin(d*x+c))/d+1/15*(32*A*a^3*b+40*A*a*b^3+8*
B*a^4+60*B*a^2*b^2+15*B*b^4)*tan(d*x+c)/d+1/16*(5*A*a^4+36*A*a^2*b^2+8*A*b^4+24*B*a^3*b+32*B*a*b^3)*sec(d*x+c)
*tan(d*x+c)/d+1/15*a*(16*A*a^2*b+13*A*b^3+4*B*a^3+27*B*a*b^2)*sec(d*x+c)^2*tan(d*x+c)/d+1/120*a^2*(25*A*a^2+48
*A*b^2+72*B*a*b)*sec(d*x+c)^3*tan(d*x+c)/d+1/10*a*(3*A*b+2*B*a)*(a+b*cos(d*x+c))^2*sec(d*x+c)^4*tan(d*x+c)/d+1
/6*a*A*(a+b*cos(d*x+c))^3*sec(d*x+c)^5*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.51, antiderivative size = 324, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {3068, 3126, 3110, 3100, 2827, 3853, 3855, 3852, 8} \begin {gather*} \frac {a^2 \left (25 a^2 A+72 a b B+48 A b^2\right ) \tan (c+d x) \sec ^3(c+d x)}{120 d}+\frac {a \left (4 a^3 B+16 a^2 A b+27 a b^2 B+13 A b^3\right ) \tan (c+d x) \sec ^2(c+d x)}{15 d}+\frac {\left (8 a^4 B+32 a^3 A b+60 a^2 b^2 B+40 a A b^3+15 b^4 B\right ) \tan (c+d x)}{15 d}+\frac {\left (5 a^4 A+24 a^3 b B+36 a^2 A b^2+32 a b^3 B+8 A b^4\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (5 a^4 A+24 a^3 b B+36 a^2 A b^2+32 a b^3 B+8 A b^4\right ) \tan (c+d x) \sec (c+d x)}{16 d}+\frac {a (2 a B+3 A b) \tan (c+d x) \sec ^4(c+d x) (a+b \cos (c+d x))^2}{10 d}+\frac {a A \tan (c+d x) \sec ^5(c+d x) (a+b \cos (c+d x))^3}{6 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x])*Sec[c + d*x]^7,x]

[Out]

((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*ArcTanh[Sin[c + d*x]])/(16*d) + ((32*a^3*A*b + 4
0*a*A*b^3 + 8*a^4*B + 60*a^2*b^2*B + 15*b^4*B)*Tan[c + d*x])/(15*d) + ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*
a^3*b*B + 32*a*b^3*B)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (a*(16*a^2*A*b + 13*A*b^3 + 4*a^3*B + 27*a*b^2*B)*Se
c[c + d*x]^2*Tan[c + d*x])/(15*d) + (a^2*(25*a^2*A + 48*A*b^2 + 72*a*b*B)*Sec[c + d*x]^3*Tan[c + d*x])/(120*d)
 + (a*(3*A*b + 2*a*B)*(a + b*Cos[c + d*x])^2*Sec[c + d*x]^4*Tan[c + d*x])/(10*d) + (a*A*(a + b*Cos[c + d*x])^3
*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 3068

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b*c - a*d))*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1
)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Si
n[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(b*c - a*d)*(B*c - A*d)*(m - 1) + a*d*(a*A*c + b*B*c -
 (A*b + a*B)*d)*(n + 1) + (b*(b*d*(B*c - A*d) + a*(A*c*d + B*(c^2 - 2*d^2)))*(n + 1) - a*(b*c - a*d)*(B*c - A*
d)*(n + 2))*Sin[e + f*x] + b*(d*(A*b*c + a*B*c - a*A*d)*(m + n + 1) - b*B*(c^2*m + d^2*(n + 1)))*Sin[e + f*x]^
2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2
, 0] && GtQ[m, 1] && LtQ[n, -1]

Rule 3100

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m
+ 1)*(a^2 - b^2))), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B +
a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b,
e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]

Rule 3110

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e
_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)
*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - Dist[1/(b^2*(m + 1)*(a^2 - b^2)
), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d +
 b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] - b*C*d*(m
 + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] &&
NeQ[a^2 - b^2, 0] && LtQ[m, -1]

Rule 3126

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C - B*c*d + A*d^2))*Cos[e
+ f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Dist[1/(d*(n + 1)
*(c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) +
(c*C - B*d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 1) - a*c*(n + 2))) - C*(b*
c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2*(n +
1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2
, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \sec ^7(c+d x) \, dx &=\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{6} \int (a+b \cos (c+d x))^2 \left (3 a (3 A b+2 a B)+\left (5 a^2 A+6 A b^2+12 a b B\right ) \cos (c+d x)+2 b (a A+3 b B) \cos ^2(c+d x)\right ) \sec ^6(c+d x) \, dx\\ &=\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{30} \int (a+b \cos (c+d x)) \left (a \left (25 a^2 A+48 A b^2+72 a b B\right )+\left (71 a^2 A b+30 A b^3+24 a^3 B+90 a b^2 B\right ) \cos (c+d x)+2 b \left (14 a A b+6 a^2 B+15 b^2 B\right ) \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx\\ &=\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}-\frac {1}{120} \int \left (-24 a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right )-15 \left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \cos (c+d x)-8 b^2 \left (14 a A b+6 a^2 B+15 b^2 B\right ) \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx\\ &=\frac {a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{15 d}+\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}-\frac {1}{360} \int \left (-45 \left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right )-24 \left (32 a^3 A b+40 a A b^3+8 a^4 B+60 a^2 b^2 B+15 b^4 B\right ) \cos (c+d x)\right ) \sec ^3(c+d x) \, dx\\ &=\frac {a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{15 d}+\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}-\frac {1}{8} \left (-5 a^4 A-36 a^2 A b^2-8 A b^4-24 a^3 b B-32 a b^3 B\right ) \int \sec ^3(c+d x) \, dx-\frac {1}{15} \left (-32 a^3 A b-40 a A b^3-8 a^4 B-60 a^2 b^2 B-15 b^4 B\right ) \int \sec ^2(c+d x) \, dx\\ &=\frac {\left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{15 d}+\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}-\frac {1}{16} \left (-5 a^4 A-36 a^2 A b^2-8 A b^4-24 a^3 b B-32 a b^3 B\right ) \int \sec (c+d x) \, dx-\frac {\left (32 a^3 A b+40 a A b^3+8 a^4 B+60 a^2 b^2 B+15 b^4 B\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{15 d}\\ &=\frac {\left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (32 a^3 A b+40 a A b^3+8 a^4 B+60 a^2 b^2 B+15 b^4 B\right ) \tan (c+d x)}{15 d}+\frac {\left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {a \left (16 a^2 A b+13 A b^3+4 a^3 B+27 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{15 d}+\frac {a^2 \left (25 a^2 A+48 A b^2+72 a b B\right ) \sec ^3(c+d x) \tan (c+d x)}{120 d}+\frac {a (3 A b+2 a B) (a+b \cos (c+d x))^2 \sec ^4(c+d x) \tan (c+d x)}{10 d}+\frac {a A (a+b \cos (c+d x))^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.84, size = 244, normalized size = 0.75 \begin {gather*} \frac {15 \left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (240 \left (4 a^3 A b+4 a A b^3+a^4 B+6 a^2 b^2 B+b^4 B\right )+15 \left (5 a^4 A+36 a^2 A b^2+8 A b^4+24 a^3 b B+32 a b^3 B\right ) \sec (c+d x)+10 a^2 \left (5 a^2 A+36 A b^2+24 a b B\right ) \sec ^3(c+d x)+40 a^4 A \sec ^5(c+d x)+160 a \left (4 a^2 A b+2 A b^3+a^3 B+3 a b^2 B\right ) \tan ^2(c+d x)+48 a^3 (4 A b+a B) \tan ^4(c+d x)\right )}{240 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x])*Sec[c + d*x]^7,x]

[Out]

(15*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(240*(4*
a^3*A*b + 4*a*A*b^3 + a^4*B + 6*a^2*b^2*B + b^4*B) + 15*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*
b^3*B)*Sec[c + d*x] + 10*a^2*(5*a^2*A + 36*A*b^2 + 24*a*b*B)*Sec[c + d*x]^3 + 40*a^4*A*Sec[c + d*x]^5 + 160*a*
(4*a^2*A*b + 2*A*b^3 + a^3*B + 3*a*b^2*B)*Tan[c + d*x]^2 + 48*a^3*(4*A*b + a*B)*Tan[c + d*x]^4))/(240*d)

________________________________________________________________________________________

Maple [A]
time = 0.29, size = 375, normalized size = 1.16

method result size
derivativedivides \(\frac {A \,a^{4} \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )-a^{4} B \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )-4 A \,a^{3} b \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+4 B \,a^{3} b \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+6 A \,a^{2} b^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-6 B \,a^{2} b^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )-4 A a \,b^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 B a \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A \,b^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+B \,b^{4} \tan \left (d x +c \right )}{d}\) \(375\)
default \(\frac {A \,a^{4} \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )-a^{4} B \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )-4 A \,a^{3} b \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+4 B \,a^{3} b \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+6 A \,a^{2} b^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-6 B \,a^{2} b^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )-4 A a \,b^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 B a \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A \,b^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+B \,b^{4} \tan \left (d x +c \right )}{d}\) \(375\)
risch \(\text {Expression too large to display}\) \(1071\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^7,x,method=_RETURNVERBOSE)

[Out]

1/d*(A*a^4*(-(-1/6*sec(d*x+c)^5-5/24*sec(d*x+c)^3-5/16*sec(d*x+c))*tan(d*x+c)+5/16*ln(sec(d*x+c)+tan(d*x+c)))-
a^4*B*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)-4*A*a^3*b*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^
2)*tan(d*x+c)+4*B*a^3*b*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))+6*A*a^2
*b^2*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))-6*B*a^2*b^2*(-2/3-1/3*sec(
d*x+c)^2)*tan(d*x+c)-4*A*a*b^3*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+4*B*a*b^3*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(
sec(d*x+c)+tan(d*x+c)))+A*b^4*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+B*b^4*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 474, normalized size = 1.46 \begin {gather*} \frac {32 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} B a^{4} + 128 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} A a^{3} b + 960 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{2} b^{2} + 640 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a b^{3} - 5 \, A a^{4} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, B a^{3} b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, A a^{2} b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 480 \, B a b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, A b^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 480 \, B b^{4} \tan \left (d x + c\right )}{480 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^7,x, algorithm="maxima")

[Out]

1/480*(32*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*B*a^4 + 128*(3*tan(d*x + c)^5 + 10*tan(d*x
+ c)^3 + 15*tan(d*x + c))*A*a^3*b + 960*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a^2*b^2 + 640*(tan(d*x + c)^3 + 3*
tan(d*x + c))*A*a*b^3 - 5*A*a^4*(2*(15*sin(d*x + c)^5 - 40*sin(d*x + c)^3 + 33*sin(d*x + c))/(sin(d*x + c)^6 -
 3*sin(d*x + c)^4 + 3*sin(d*x + c)^2 - 1) - 15*log(sin(d*x + c) + 1) + 15*log(sin(d*x + c) - 1)) - 120*B*a^3*b
*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*
log(sin(d*x + c) - 1)) - 180*A*a^2*b^2*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)
^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 480*B*a*b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1
) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 120*A*b^4*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(
d*x + c) + 1) + log(sin(d*x + c) - 1)) + 480*B*b^4*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 327, normalized size = 1.01 \begin {gather*} \frac {15 \, {\left (5 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 32 \, B a b^{3} + 8 \, A b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (5 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 32 \, B a b^{3} + 8 \, A b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (8 \, B a^{4} + 32 \, A a^{3} b + 60 \, B a^{2} b^{2} + 40 \, A a b^{3} + 15 \, B b^{4}\right )} \cos \left (d x + c\right )^{5} + 40 \, A a^{4} + 15 \, {\left (5 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 32 \, B a b^{3} + 8 \, A b^{4}\right )} \cos \left (d x + c\right )^{4} + 32 \, {\left (2 \, B a^{4} + 8 \, A a^{3} b + 15 \, B a^{2} b^{2} + 10 \, A a b^{3}\right )} \cos \left (d x + c\right )^{3} + 10 \, {\left (5 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2} + 48 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^7,x, algorithm="fricas")

[Out]

1/480*(15*(5*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*cos(d*x + c)^6*log(sin(d*x + c) + 1) -
15*(5*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*cos(d*x + c)^6*log(-sin(d*x + c) + 1) + 2*(16*
(8*B*a^4 + 32*A*a^3*b + 60*B*a^2*b^2 + 40*A*a*b^3 + 15*B*b^4)*cos(d*x + c)^5 + 40*A*a^4 + 15*(5*A*a^4 + 24*B*a
^3*b + 36*A*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*cos(d*x + c)^4 + 32*(2*B*a^4 + 8*A*a^3*b + 15*B*a^2*b^2 + 10*A*a*b
^3)*cos(d*x + c)^3 + 10*(5*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2)*cos(d*x + c)^2 + 48*(B*a^4 + 4*A*a^3*b)*cos(d*x
+ c))*sin(d*x + c))/(d*cos(d*x + c)^6)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(d*x+c))**4*(A+B*cos(d*x+c))*sec(d*x+c)**7,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 8570 deep

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1186 vs. \(2 (310) = 620\).
time = 0.55, size = 1186, normalized size = 3.66 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^7,x, algorithm="giac")

[Out]

1/240*(15*(5*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15
*(5*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(165*A*a^
4*tan(1/2*d*x + 1/2*c)^11 - 240*B*a^4*tan(1/2*d*x + 1/2*c)^11 - 960*A*a^3*b*tan(1/2*d*x + 1/2*c)^11 + 600*B*a^
3*b*tan(1/2*d*x + 1/2*c)^11 + 900*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^11 - 1440*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^11 -
 960*A*a*b^3*tan(1/2*d*x + 1/2*c)^11 + 480*B*a*b^3*tan(1/2*d*x + 1/2*c)^11 + 120*A*b^4*tan(1/2*d*x + 1/2*c)^11
 - 240*B*b^4*tan(1/2*d*x + 1/2*c)^11 + 25*A*a^4*tan(1/2*d*x + 1/2*c)^9 + 560*B*a^4*tan(1/2*d*x + 1/2*c)^9 + 22
40*A*a^3*b*tan(1/2*d*x + 1/2*c)^9 - 840*B*a^3*b*tan(1/2*d*x + 1/2*c)^9 - 1260*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^9
 + 5280*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^9 + 3520*A*a*b^3*tan(1/2*d*x + 1/2*c)^9 - 1440*B*a*b^3*tan(1/2*d*x + 1/
2*c)^9 - 360*A*b^4*tan(1/2*d*x + 1/2*c)^9 + 1200*B*b^4*tan(1/2*d*x + 1/2*c)^9 + 450*A*a^4*tan(1/2*d*x + 1/2*c)
^7 - 1248*B*a^4*tan(1/2*d*x + 1/2*c)^7 - 4992*A*a^3*b*tan(1/2*d*x + 1/2*c)^7 + 240*B*a^3*b*tan(1/2*d*x + 1/2*c
)^7 + 360*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^7 - 8640*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^7 - 5760*A*a*b^3*tan(1/2*d*x
+ 1/2*c)^7 + 960*B*a*b^3*tan(1/2*d*x + 1/2*c)^7 + 240*A*b^4*tan(1/2*d*x + 1/2*c)^7 - 2400*B*b^4*tan(1/2*d*x +
1/2*c)^7 + 450*A*a^4*tan(1/2*d*x + 1/2*c)^5 + 1248*B*a^4*tan(1/2*d*x + 1/2*c)^5 + 4992*A*a^3*b*tan(1/2*d*x + 1
/2*c)^5 + 240*B*a^3*b*tan(1/2*d*x + 1/2*c)^5 + 360*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^5 + 8640*B*a^2*b^2*tan(1/2*d
*x + 1/2*c)^5 + 5760*A*a*b^3*tan(1/2*d*x + 1/2*c)^5 + 960*B*a*b^3*tan(1/2*d*x + 1/2*c)^5 + 240*A*b^4*tan(1/2*d
*x + 1/2*c)^5 + 2400*B*b^4*tan(1/2*d*x + 1/2*c)^5 + 25*A*a^4*tan(1/2*d*x + 1/2*c)^3 - 560*B*a^4*tan(1/2*d*x +
1/2*c)^3 - 2240*A*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 840*B*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 1260*A*a^2*b^2*tan(1/2*d
*x + 1/2*c)^3 - 5280*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 - 3520*A*a*b^3*tan(1/2*d*x + 1/2*c)^3 - 1440*B*a*b^3*tan
(1/2*d*x + 1/2*c)^3 - 360*A*b^4*tan(1/2*d*x + 1/2*c)^3 - 1200*B*b^4*tan(1/2*d*x + 1/2*c)^3 + 165*A*a^4*tan(1/2
*d*x + 1/2*c) + 240*B*a^4*tan(1/2*d*x + 1/2*c) + 960*A*a^3*b*tan(1/2*d*x + 1/2*c) + 600*B*a^3*b*tan(1/2*d*x +
1/2*c) + 900*A*a^2*b^2*tan(1/2*d*x + 1/2*c) + 1440*B*a^2*b^2*tan(1/2*d*x + 1/2*c) + 960*A*a*b^3*tan(1/2*d*x +
1/2*c) + 480*B*a*b^3*tan(1/2*d*x + 1/2*c) + 120*A*b^4*tan(1/2*d*x + 1/2*c) + 240*B*b^4*tan(1/2*d*x + 1/2*c))/(
tan(1/2*d*x + 1/2*c)^2 - 1)^6)/d

________________________________________________________________________________________

Mupad [B]
time = 3.75, size = 706, normalized size = 2.18 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {5\,A\,a^4}{16}+\frac {3\,B\,a^3\,b}{2}+\frac {9\,A\,a^2\,b^2}{4}+2\,B\,a\,b^3+\frac {A\,b^4}{2}\right )}{\frac {5\,A\,a^4}{4}+6\,B\,a^3\,b+9\,A\,a^2\,b^2+8\,B\,a\,b^3+2\,A\,b^4}\right )\,\left (\frac {5\,A\,a^4}{8}+3\,B\,a^3\,b+\frac {9\,A\,a^2\,b^2}{2}+4\,B\,a\,b^3+A\,b^4\right )}{d}+\frac {\left (\frac {11\,A\,a^4}{8}+A\,b^4-2\,B\,a^4-2\,B\,b^4+\frac {15\,A\,a^2\,b^2}{2}-12\,B\,a^2\,b^2-8\,A\,a\,b^3-8\,A\,a^3\,b+4\,B\,a\,b^3+5\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (\frac {5\,A\,a^4}{24}-3\,A\,b^4+\frac {14\,B\,a^4}{3}+10\,B\,b^4-\frac {21\,A\,a^2\,b^2}{2}+44\,B\,a^2\,b^2+\frac {88\,A\,a\,b^3}{3}+\frac {56\,A\,a^3\,b}{3}-12\,B\,a\,b^3-7\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {15\,A\,a^4}{4}+2\,A\,b^4-\frac {52\,B\,a^4}{5}-20\,B\,b^4+3\,A\,a^2\,b^2-72\,B\,a^2\,b^2-48\,A\,a\,b^3-\frac {208\,A\,a^3\,b}{5}+8\,B\,a\,b^3+2\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {15\,A\,a^4}{4}+2\,A\,b^4+\frac {52\,B\,a^4}{5}+20\,B\,b^4+3\,A\,a^2\,b^2+72\,B\,a^2\,b^2+48\,A\,a\,b^3+\frac {208\,A\,a^3\,b}{5}+8\,B\,a\,b^3+2\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {5\,A\,a^4}{24}-3\,A\,b^4-\frac {14\,B\,a^4}{3}-10\,B\,b^4-\frac {21\,A\,a^2\,b^2}{2}-44\,B\,a^2\,b^2-\frac {88\,A\,a\,b^3}{3}-\frac {56\,A\,a^3\,b}{3}-12\,B\,a\,b^3-7\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {11\,A\,a^4}{8}+A\,b^4+2\,B\,a^4+2\,B\,b^4+\frac {15\,A\,a^2\,b^2}{2}+12\,B\,a^2\,b^2+8\,A\,a\,b^3+8\,A\,a^3\,b+4\,B\,a\,b^3+5\,B\,a^3\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*cos(c + d*x))*(a + b*cos(c + d*x))^4)/cos(c + d*x)^7,x)

[Out]

(atanh((4*tan(c/2 + (d*x)/2)*((5*A*a^4)/16 + (A*b^4)/2 + (9*A*a^2*b^2)/4 + 2*B*a*b^3 + (3*B*a^3*b)/2))/((5*A*a
^4)/4 + 2*A*b^4 + 9*A*a^2*b^2 + 8*B*a*b^3 + 6*B*a^3*b))*((5*A*a^4)/8 + A*b^4 + (9*A*a^2*b^2)/2 + 4*B*a*b^3 + 3
*B*a^3*b))/d + (tan(c/2 + (d*x)/2)*((11*A*a^4)/8 + A*b^4 + 2*B*a^4 + 2*B*b^4 + (15*A*a^2*b^2)/2 + 12*B*a^2*b^2
 + 8*A*a*b^3 + 8*A*a^3*b + 4*B*a*b^3 + 5*B*a^3*b) + tan(c/2 + (d*x)/2)^11*((11*A*a^4)/8 + A*b^4 - 2*B*a^4 - 2*
B*b^4 + (15*A*a^2*b^2)/2 - 12*B*a^2*b^2 - 8*A*a*b^3 - 8*A*a^3*b + 4*B*a*b^3 + 5*B*a^3*b) - tan(c/2 + (d*x)/2)^
3*(3*A*b^4 - (5*A*a^4)/24 + (14*B*a^4)/3 + 10*B*b^4 + (21*A*a^2*b^2)/2 + 44*B*a^2*b^2 + (88*A*a*b^3)/3 + (56*A
*a^3*b)/3 + 12*B*a*b^3 + 7*B*a^3*b) + tan(c/2 + (d*x)/2)^9*((5*A*a^4)/24 - 3*A*b^4 + (14*B*a^4)/3 + 10*B*b^4 -
 (21*A*a^2*b^2)/2 + 44*B*a^2*b^2 + (88*A*a*b^3)/3 + (56*A*a^3*b)/3 - 12*B*a*b^3 - 7*B*a^3*b) + tan(c/2 + (d*x)
/2)^5*((15*A*a^4)/4 + 2*A*b^4 + (52*B*a^4)/5 + 20*B*b^4 + 3*A*a^2*b^2 + 72*B*a^2*b^2 + 48*A*a*b^3 + (208*A*a^3
*b)/5 + 8*B*a*b^3 + 2*B*a^3*b) + tan(c/2 + (d*x)/2)^7*((15*A*a^4)/4 + 2*A*b^4 - (52*B*a^4)/5 - 20*B*b^4 + 3*A*
a^2*b^2 - 72*B*a^2*b^2 - 48*A*a*b^3 - (208*A*a^3*b)/5 + 8*B*a*b^3 + 2*B*a^3*b))/(d*(15*tan(c/2 + (d*x)/2)^4 -
6*tan(c/2 + (d*x)/2)^2 - 20*tan(c/2 + (d*x)/2)^6 + 15*tan(c/2 + (d*x)/2)^8 - 6*tan(c/2 + (d*x)/2)^10 + tan(c/2
 + (d*x)/2)^12 + 1))

________________________________________________________________________________________